Passed
Push — master ( f28044...8bf019 )
by Felipe Catão do
01:08
created

routes   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 8
eloc 31
dl 0
loc 43
rs 10
c 0
b 0
f 0

7 Functions

Rating   Name   Duplication   Size   Complexity  
A docc 0 5 1
A routesCreated 0 14 2
A aboutRoute 0 5 1
A teste 0 5 1
A doc 0 3 1
A structureBasic 0 6 1
A about 0 3 1
1
import EngineApp from '../../Framework/engine.js'
2
import homePage from "../pages/home.js"
3
import docs from '../pages/docs.js'
4
import AboutPage from '../pages/about.js'
5
import articlefrag from '../components/articlefrag.js'
6
7
var isCreate=false
8
var eng=new EngineApp()
9
10
class routes{
11
    routesCreated(){
12
        
13
        //sistemas De rotas
14
        if(isCreate==false){
0 ignored issues
show
Best Practice introduced by
Comparing isCreate to false using the == operator is not safe. Consider using === instead.
Loading history...
15
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#pageInitial",this.teste)
16
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#docs",this.docc) 
17
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#about",this.aboutRoute)  
18
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#docs/structurebasic",this.structureBasic)
19
        }
20
        isCreate=true
21
        eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial")
22
        eng.routesEngine.whenUpdate(eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial"))
23
    
24
    }
25
    teste(){
26
        eng.renderEngine.pageDynamic="dinamic-Article"
27
        eng.renderEngine.clearPage()
28
        homePage()
29
    }
30
    docc(){
31
    eng.renderEngine.pageDynamic="dinamic-Article"
32
    eng.renderEngine.clearPage()
33
    docs()
34
    }
35
    aboutRoute(){
36
        eng.renderEngine.pageDynamic="dinamic-Article"
37
        eng.renderEngine.clearPage()
38
        AboutPage()
39
    }
40
    doc(){
41
        eng.routesEngine.goToLink("http://127.0.0.1:5500/LavineWiki/index.html#docs")
42
    }
43
    about(){
44
        eng.routesEngine.goToLink("http://127.0.0.1:5500/LavineWiki/index.html#about")
45
    }
46
    structureBasic(){
47
        eng.renderEngine.pageDynamic="readArea"
48
        docs()
49
        eng.renderEngine.clearPage()
50
        articlefrag("art0","Architeture of Lavine","Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam culpa laudantium neque fugit, tenetur quis exercitationem, nostrum, vero quasi voluptatibus harum accusantium aspernatur? Esse, repellendus exercitationem ullam perspiciatis rerum sapiente.","readArea")
51
    }
52
}
53
54
55
export default routes
56